package com.zhw.service.impl;

import com.zhw.mapper.OrderMapper;
import com.zhw.pojo.entry.OrderDetail;
import com.zhw.pojo.vo.OrderFormVO;
import com.zhw.pojo.vo.OrderVO;
import com.zhw.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderMapper orderMapper;

    @Override
    public List<OrderVO> getOrder(Integer id) {
        return orderMapper.getOrder(id);
    }


    @Override
    public OrderFormVO getOrderForm(Integer id) {
        return orderMapper.getOrderByID(id);
    }

    @Override
    public List<OrderDetail> getOrderTable(Integer id) {
        return orderMapper.getOrderDetailByID(id);
    }
}
